

package net.qiqbframework.persisthanding;

import net.qiqbframework.messaging.Message;

/**
 * 持久化消息
 *
 * @param <A>
 */
public interface PersistMessage<A> extends Message<A> {

    /**
     * 持久化消息名称，
     *
     * @return
     */
    String getPersistName();

    /**
     * 快照
     *
     * @return
     */
    A getSnapshotAggregateRoot();

    boolean isDeleted();

    boolean isNew();

    default PersistMessage<A> next() {
        return null;
    }

    void next(PersistMessage<A> nextPersist);

}
